﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Manul.Genetics
{
    public abstract class SortedStorage : NamedItem
    {
        public void MoveUp(int index)
        {
            Swap(index, index - 1);
        }

        public void MoveDown(int index)
        {
            Swap(index, index + 1);
        }
        public abstract void Swap(int index1, int index2);
        public abstract bool IsInList(int index);
    }
}
